<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约记录</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">预约记录</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="list-column1">
            <input type="date" v-model="startDate">
            <input type="date" v-model="endDate">
            <button type="button" @click="submit()">查询</button>
        </div>

        <!--<div class="list-column2">-->
        <div>
            <ul class="list">
                <li class="list-item" v-for="setmeal in setmealList">

                    <a class="link-page" :href="'2menus_test.html?setmealId='+setmeal.setmealId+'&memberId='+setmeal.memberId">
                        <!--动态显示存储在七牛云中的图片 'http://qjhg2j8pb.hd-bkt.clouddn.com/'+setmeal.img 图片的完整路径-->
                        <img class="img-object f-left" :src="'http://qjhg2j8pb.hd-bkt.clouddn.com/'+setmeal.img" alt="">
                        <div class="item-body">
                            <h4 class="ellipsis item-title">体检人{{setmeal.membername}}</h4>
                            <p class="ellipsis-more item-desc">预约套餐{{setmeal.setmealname}}</p>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div>

    </div>


</div>
<!-- 页面 css js -->
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<!--<script src="../js/page-health-order.js"></script>-->
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            startDate:"",
            endDate:"",
            setmealList:[]
        },
        methods:{
            submit(){
                axios.post("/1menus/get1menusByTime.do?startDate="+this.startDate+"&endDate="+this.endDate).then((response) => {
                    if (response.data.flag) {
                        this.setmealList = response.data.data;
                    }else{
                        alert("查询失败");
                    }
                });
            }
        },
        //钩子函数， VUE加载完成后进行 调用(可以看成页面加载完成时进行调用)
        mounted() {
            axios.post("/1menus/get1menus.do").then((response) => {
                if (response.data.flag) {
                    this.setmealList = response.data.data;
                }else{
                    alert("查询失败")
                }
            });
        }
    });
</script>
</body>
</html>